package cn.hznc.constant;

/**
 * @Author：Administrator
 * @Date：2023/4/21 15:26
 */
public enum OrderStatusEnum{

    NEW_BUILD(0,"新建"),

    PROCESSING(1,"进行中"),

    FINISH(2,"完成");

    /**
     * 状态
     */
    private Integer status;

    /**
     * 描述
     */
    private String statusDesc;

    OrderStatusEnum(Integer status, String statusDesc) {
        this.status = status;
        this.statusDesc = statusDesc;
    }

    public Integer getStatus() {
        return status;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public static String getStatusDescByStatus(Integer status) {
        OrderStatusEnum arrObj[] = OrderStatusEnum.values();
        for (OrderStatusEnum obj : arrObj) {
            if (status.intValue() == obj.status.intValue()) {
                return obj.getStatusDesc();
            }
        }
        return "";
    }
}
